<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 日期格式 </title>
</head>
<body>
<h2>ISO 日期</h2>
<p>"2018-02-19"  国际标准</p>
<p id="demo"></p>

<script>
  var d=new Date("2019-05-02");
  document.getElementById("demo").innerHTML=d;
</script>

</body>
</html>

<!--
输出结果:Thu May 02 2019 08:00:00 GMT+0800 (China Standard Time)
-->